package com.lx.zy.project.system.controller;

import com.lx.zy.framework.web.controller.BaseController;
import com.lx.zy.framework.web.page.TableDataInfo;
import com.lx.zy.project.system.domain.SysPost;
import com.lx.zy.project.system.service.ISysPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: zy-vue
 * @description: 岗位管理web层
 * @author: Lx
 * @create: 2019-11-04 18:18
 **/
@RestController
@RequestMapping("/system/post")
public class SysPostController extends BaseController
{
    @Autowired
    private ISysPostService postService;

    @PreAuthorize("@ps.hasPermi('system:post:list')")
    @GetMapping("/list")
    public TableDataInfo list(SysPost post)
    {
        startPage();
        List<SysPost> list = postService.selectPostList(post);
        return getDataTable(list);
    }
}
